FROM centos:centos7
MAINTAINER leenhem
RUN mkdir /usr/local/jdk
WORKDIR /usr/local/jdk
ADD jdk-8u151-linux-x64.tar.gz /usr/local/jdk
ADD tomcat /usr/local/tomcat

ENV JAVA_HOME /usr/local/jdk/jdk1.8.0_151
ENV JRE_HOME /usr/local/jdk/jdk1.8.0_151/jre
ENV CLASSPATH .:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib:$CLASSPATH
ENV PATH $JAVA_HOME/bin:$JRE_HOME/bin:$PATH

ENV CATALINA_HOME=/usr/local/tomcat

WORKDIR /usr/local/tomcat


RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

EXPOSE 8080
CMD ["/usr/local/tomcat/bin/catalina.sh","run"]
